<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head th:replace="layouts::header"></head>
<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container1 ">
    <form th:action="@{/curriculum/save}" th:object="${curriculum}" method="POST">

        <div class="box">
        <div class="form-group">
            <div>
                <label class="a1">课程编号:</label>
                <input type="text" placeholder="请输入课程编号" th:field="${curriculum.curriculumNum}"><br>
                <span th:if="${#fields.hasErrors('curriculumNum')}" th:errors="${curriculum.curriculumNum}"></span>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">课程名称:</label>
                <input type="text" placeholder="请输入课程名称" th:field="${curriculum.curriculumName}"><br>
                <span th:if="${#fields.hasErrors('curriculumName')}" th:errors="${curriculum.curriculumName}"></span>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">学时:</label>
                <input type="text" style="width: 250px" placeholder="所需学时" th:field="${curriculum.class_hour}">
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">学分:</label>
                <input type="text" style="width: 250px" placeholder="所需学分" th:field="${curriculum.credit}">
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">指导老师:</label>
                <select class="form-control" style="width: 290px"  th:field="*{teacher}">
                    <option th:each="teacher : ${teacher}" th:value="${teacher.teacherId}" th:text="${teacher.name1}">
                    </option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div>
                <label class="a1">课程性质:</label>
                <label class="a1">
                    <input type="radio" th:field="${curriculum.nature}" value="必修">必修
                </label>
                <label class="a1">
                    <input type="radio" th:field="${curriculum.nature}" value="选修">选修
                </label>
                <br>
                <span th:if="${#fields.hasErrors('nature')}" th:errors="${curriculum.nature}"></span>
            </div>
        </div>
        <br>
        </div>
        <div class="a2">
        <button class="btn btn-info" type="submit">创建课程</button>
        </div>
    </form>
</div>
</body>
</html>